//kullanılmıyor
			/* When this function is called, PhoneGap has been initialized and is ready to roll */
			function onDeviceReady() {
				alert('onDeviceReady');    
			    // IMPORTANT: must start notify after device is ready,
			    // otherwise you will not be able to receive notification in JS callback
			    navigator.pushNotification.startNotify();
			
			    // Typically, you want to register APN every time when app starts
			    registerAPN();
			}
			
			/**
			 * Customize following callbacks in your application
			*/
			
			// Callback when receiving notification
			PushNotification.prototype.notificationCallback = function (notification) {
			    var msg = '';
			    for (var property in notification) {
			        msg += property + ' : ' + notification[property] + '\n';
			    }
			    alert(msg);
			};
			
			// when register APN succeeded
			function successCallback(e) {
			    alert("Device registered. Device token: " + e.deviceToken);
			}
			
			// when register APN failed
			function errorCallback(e) {
			    alert('Error during registration: '+e.error);
			}
			
			// register button action
			function registerAPN() {
			    navigator.pushNotification.register(successCallback, errorCallback, { alert:true, badge:true, sound:true });
			
			    //specify no parameter or (null, null, {}) to unregister APN
			    //navigator.pushNotification.register();
			}
			
			
			// when APN register succeeded
			function successCallback(e) {
			    registerUAPush(e.deviceToken, e.host, e.appKey, e.appSecret);
			}
			
			// register with Urban Airship push service
			function registerUAPush(deviceToken, host, appKey, appSecret) {
			    var request = new XMLHttpRequest();
			        
			    // open the client and encode our URL
			    request.open('PUT', host+'api/device_tokens/'+deviceToken, true, appKey, appSecret);
			        
			    // callback when request finished
			    request.onload = function() {
			        if (this.status == 200 || this.status == 201) {
			            // succeeded
			            alert('UA push service successfully registered.');
			        } else {
			            // error
			            alert('Error when registering UA push service.\nError: '+this.statusText);
			        }
			    };
			
			    request.send();
			}
